import AppPopupSelect from '~/components/AppPopupSelect.vue';

export function usePopupSelect(title: string, options: Array<{ label: string, value: string, [key: string]: any }>,
    active: Ref<string, string>, callbackFn: (active: string) => void
) {
    const nuxtApp = useNuxtApp()
    const { t } = nuxtApp.$i18n;
    const {
        open: openPopupSelect,
        close: closePopupSelect,
    } = usePop(AppPopupSelect, { options, active, callbackFn }, {
        title,
        wraperClass: '',
    })
    return {
        openPopupSelect,
        closePopupSelect,
    }
}